package mytest;

public class TreeNode {
    String data;
    TreeNode leftchild;
    TreeNode rightchild;
    TreeNode parent;
    TreeNode()
    {
        data = "";
        leftchild = null;
        leftchild = null;
        leftchild = null;
    }
    TreeNode(String value)
    {
        data = value;
        leftchild = null;
        leftchild = null;
        leftchild = null;
    }
    TreeNode(String value,TreeNode left,TreeNode right,TreeNode p)
    {
        data = value;
        leftchild = left;
        rightchild = right;
        parent = p;
    }
    public void setLeftChild(TreeNode left)
    {
        leftchild = left;
    }
    public void setRightChild(TreeNode right)
    {
        rightchild = right;
    }
    public void setParent(TreeNode p)
    {
        parent = p;
    }
    public void setData(String value)
    {
        data = value;
    }

}
